package com.heatup.apt.model.api;

/**
 * Created by b3st9u on 16/8/20.
 */
public class ApiResultModel <T>{
	
	public static final int RET_SUCCESS = 0;
	
	public static final int RET_ERROR = -1;

	private int ErrorCode;//错误码
	
    private int ret;
    private String msg;
    private boolean logined;
    private T data;

    public ApiResultModel() {
    	
    }
    
    public ApiResultModel(Boolean isLogin) {
    	this.logined = isLogin;
    }
    
    public int getErrorCode() {
        return ErrorCode;
    }

    public void setErrorCode(int errorCode) {
        ErrorCode = errorCode;
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isLogined() {
        return logined;
    }

    public void setLogined(boolean logined) {
        this.logined = logined;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ApiResultModel{");
        sb.append("ErrorCode=").append(ErrorCode);
        sb.append(", ret=").append(ret);
        sb.append(", msg='").append(msg).append('\'');
        sb.append(", logined=").append(logined);
        sb.append(", data=").append(data);
        sb.append('}');
        return sb.toString();
    }
}
